package model;


/**
 * Write a description of class Person here.
 * 
 * @author Group 5 
 * @version (a version number or a date)
 */
public class Person{
     private static long idCounter = 0;
    
    
    //Fields
    private String id;
    private String name;
    private String adress;
    private String phone;
    
    //Constructor
    public Person(String name, String adress, String phone){
        this.name=name;
        this.adress=adress;
        this.phone=phone;
        id = createID();
    }
    
    public static synchronized String createID()
        {
            return String.valueOf(idCounter++);
        }
    //Set&get methods
    
    public void setName(String name){
        this.name=name;
    }
    
    public void setAddress(String adress){
        this.adress=adress;
    }
    
    public void setPhone(String phone){
        this.phone=phone;
    }
    
    public String getID(){
        return id;
    }
    
    public String getName(){
        return name;
    }
    
    public String getAddress(){
        return adress;
    }
    
    public String getPhone(){
        return phone;
    }
}